#ifndef _RESULT_H__

#define _RESULT_H__

#include "xyu.h"
#include "Task.h"
#include "Semaphore.h"

namespace util
{
    class Result
    {
    public:
        Result(std::shared_ptr<Task> task, const ResultState state);
        ~Result() = default;

        void put(void*);
        void* get();
    private:
        void* res_;
        std::shared_ptr<Task> task_;
        ResultState state_; 
        Semaphore sem_;
    };
}

#endif // !_RESULT_H__